package com.bawei.module_home.adapter;

import com.bawei.library_base.BaseApp;
import com.bawei.library_base.utils.GlideUtil;
import com.bawei.module_home.R;
import com.zhpan.bannerview.BaseBannerAdapter;
import com.zhpan.bannerview.BaseViewHolder;

/**
 * @author : zhiyu
 * @date : 2021/12/10
 * @content :
 */
public class VpBannerAdapter extends BaseBannerAdapter<String> {
    @Override
    protected void bindData(BaseViewHolder<String> holder, String data, int position, int pageSize) {
       GlideUtil.getInstance().LoadImage(BaseApp.context,data,holder.findViewById(R.id.item_vp_banner_img));
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_vp_banner;
    }
//    public VpBannerAdapter( @Nullable List<String> data) {
//        super(R.layout.item_vp_banner, data);
//    }
//
//    @Override
//    protected void convert(@NotNull BaseViewHolder baseViewHolder, String s) {
//        GlideUtil.getInstance().LoadImage(getContext(),s,baseViewHolder.getView(R.id.item_vp_banner_img));
//    }
}
